.\" Copyright 2001 Red Hat, Inc.
.TH pam_console_apply 8 2005/5/2 "Red Hat" "System Administrator's Manual"
.SH NAME
pam_console_apply \- set or revoke permissions for users at the system console
.SH SYNOPSIS
.B pam_console_apply
[-f <fstab file>] [-c <console.perms file>] [-r] [-t <tty>] [-s] [-d] [<device file> ...]
.SH DESCRIPTION
\fBpam_console_apply\fP is a helper executable which sets or resets permissions
on device nodes.
.br
If \fI/var/run/console.lock\fP exists, \fBpam_console_apply\fP will grant
permissions to the user listed therein.  If the lock file does not exist,
permissions are reset according to defaults set in \fIconsole.perms\fP files,
normally configured to set permissions on devices so that \fBroot\fP
owns them.

When initializing its configuration it first parses
the \fI/etc/security/console.perms\fP file and then it searches for files
ending with the \fI.perms\fP suffix in the \fI/etc/security/console.perms.d\fP
directory. These files are parsed in the lexical order in "C" locale.
Permission rules are appended to a global list, console and device class
definitions override previous definitions of the same class.
.SH ARGUMENTS
.IP -c
Load other console.perms file than the default one.
.IP -f
Load other fstab file than the default one (\fI/etc/fstab\fP).
.IP -r
Signals \fBpam_console_apply\fP to reset permissions.  The default is to set
permissions so that the user listed in \fI/var/run/console.lock\fP has access
to the devices, and to reset permissions if no such file exists.
.IP -t
Use <tty> to match console class in console.perms file. The default is tty0.
.IP -s
Write error messages to the system log instead of stderr.
.IP -d
Log/display messages useful for debugging.
.PP
The optional <device file> arguments constrain what files should be affected
by \fBpam_console_apply\fP. If they aren't specified permissions are
changed on all files specified in the \fIconsole.perms\fP file.
.SH FILES
\fI/var/run/console.lock\fP
.br
\fI/etc/security/console.perms\fP
.br
\fI/etc/security/console.perms.d/50-default.perms\fP
.SH "SEE ALSO"
.BR pam_console(8)
.br
.BR console.perms(5)
.br
.SH BUGS
Let's hope not, but if you find any, please report them via the "Bug Track"
link at http://bugzilla.redhat.com/bugzilla/
.SH AUTHORS
Nalin Dahyabhai <nalin@redhat.com>, using code shamelessly stolen from parts of
pam_console.
.br
Support of console.perms.d and other improvements by
Tomas Mraz <tmraz@redhat.com>.
